<?php
include('connection.php');
if($_GET['event_id'])
{
$event_id=$_GET['event_id'];
$sql="DELETE FROM `event` WHERE event_id=$event_id";
$result=mysql_query($sql,$con);
if(! $result )
{
  header('location: error.php');
}
header('location: list.php?list=event');
} 
if($_GET['course_id'])
{
$course_id=$_GET['course_id'];
$sql="DELETE FROM `course` WHERE course_id=$course_id";
$result=mysql_query($sql,$con);
if(! $result )
{
  header('location: error.php');
}
header('location: list.php?list=course');
} 
?>